'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    // 插入穿搭记录数据
    await queryInterface.bulkInsert('wear_records', [
      {
        id: 1,
        user_id: 1,
        outfit_id: 1, // 商务休闲
        wear_date: new Date('2024-01-15'),
        occasion: '工作会议',
        location: '公司',
        weather: JSON.stringify({
          temperature: 22,
          condition: '晴天',
          humidity: '60%'
        }),
        temperature: 22.0,
        mood: '自信',
        rating: 4.5,
        photos: JSON.stringify([]),
        notes: '今天的会议很成功，这套搭配很适合商务场合',
        tags: JSON.stringify(['商务', '会议', '成功']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 2,
        user_id: 1,
        outfit_id: 2, // 周末出游
        wear_date: new Date('2024-01-13'),
        occasion: '周末购物',
        location: '购物中心',
        weather: JSON.stringify({
          temperature: 18,
          condition: '多云',
          humidity: '55%'
        }),
        temperature: 18.0,
        mood: '轻松',
        rating: 4.0,
        photos: JSON.stringify([]),
        notes: '舒适的休闲搭配，逛街一整天都不累',
        tags: JSON.stringify(['休闲', '购物', '舒适']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 3,
        user_id: 1,
        outfit_id: 3, // 正式场合
        wear_date: new Date('2024-01-12'),
        occasion: '重要面试',
        location: '写字楼',
        weather: JSON.stringify({
          temperature: 20,
          condition: '阴天',
          humidity: '65%'
        }),
        temperature: 20.0,
        mood: '紧张但自信',
        rating: 5.0,
        photos: JSON.stringify([]),
        notes: '面试成功！正式的搭配给了我很大的信心',
        tags: JSON.stringify(['面试', '正式', '成功']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 4,
        user_id: 1,
        outfit_id: 4, // 运动休闲
        wear_date: new Date('2024-01-11'),
        occasion: '健身房',
        location: '健身房',
        weather: JSON.stringify({
          temperature: 24,
          condition: '室内',
          humidity: '70%'
        }),
        temperature: 24.0,
        mood: '充满活力',
        rating: 4.2,
        photos: JSON.stringify([]),
        notes: '运动后感觉很棒，这套搭配很适合健身',
        tags: JSON.stringify(['运动', '健身', '活力']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 5,
        user_id: 1,
        outfit_id: 5, // 秋日温暖
        wear_date: new Date('2024-01-10'),
        occasion: '约会',
        location: '咖啡厅',
        weather: JSON.stringify({
          temperature: 15,
          condition: '微风',
          humidity: '50%'
        }),
        temperature: 15.0,
        mood: '浪漫',
        rating: 4.8,
        photos: JSON.stringify([]),
        notes: '完美的约会搭配，层次丰富又温暖',
        tags: JSON.stringify(['约会', '浪漫', '温暖']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 6,
        user_id: 1,
        outfit_id: 1, // 商务休闲 (再次穿着)
        wear_date: new Date('2024-01-09'),
        occasion: '客户拜访',
        location: '客户公司',
        weather: JSON.stringify({
          temperature: 19,
          condition: '晴天',
          humidity: '58%'
        }),
        temperature: 19.0,
        mood: '专业',
        rating: 4.3,
        photos: JSON.stringify([]),
        notes: '客户对我的专业形象印象深刻',
        tags: JSON.stringify(['客户', '专业', '商务']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 7,
        user_id: 1,
        outfit_id: 2, // 周末出游 (再次穿着)
        wear_date: new Date('2024-01-08'),
        occasion: '朋友聚会',
        location: '餐厅',
        weather: JSON.stringify({
          temperature: 21,
          condition: '晴天',
          humidity: '52%'
        }),
        temperature: 21.0,
        mood: '开心',
        rating: 4.1,
        photos: JSON.stringify([]),
        notes: '和朋友们度过了愉快的时光',
        tags: JSON.stringify(['聚会', '朋友', '开心']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 8,
        user_id: 1,
        outfit_id: 4, // 运动休闲 (再次穿着)
        wear_date: new Date('2024-01-07'),
        occasion: '日常外出',
        location: '超市',
        weather: JSON.stringify({
          temperature: 17,
          condition: '多云',
          humidity: '60%'
        }),
        temperature: 17.0,
        mood: '平静',
        rating: 3.8,
        photos: JSON.stringify([]),
        notes: '简单的日常外出，舒适实用',
        tags: JSON.stringify(['日常', '实用', '舒适']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 9,
        user_id: 1,
        outfit_id: 1, // 商务休闲 (第三次穿着)
        wear_date: new Date('2024-01-06'),
        occasion: '工作日',
        location: '办公室',
        weather: JSON.stringify({
          temperature: 23,
          condition: '晴天',
          humidity: '55%'
        }),
        temperature: 23.0,
        mood: '高效',
        rating: 4.4,
        photos: JSON.stringify([]),
        notes: '经典的工作日搭配，永远不会出错',
        tags: JSON.stringify(['工作', '经典', '高效']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 10,
        user_id: 1,
        outfit_id: 3, // 正式场合 (再次穿着)
        wear_date: new Date('2024-01-05'),
        occasion: '商务晚宴',
        location: '酒店',
        weather: JSON.stringify({
          temperature: 16,
          condition: '室内',
          humidity: '45%'
        }),
        temperature: 16.0,
        mood: '优雅',
        rating: 4.9,
        photos: JSON.stringify([]),
        notes: '正式场合的完美选择，收到很多赞美',
        tags: JSON.stringify(['晚宴', '优雅', '正式']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 11,
        user_id: 1,
        outfit_id: 5, // 秋日温暖 (再次穿着)
        wear_date: new Date('2024-01-04'),
        occasion: '周末散步',
        location: '公园',
        weather: JSON.stringify({
          temperature: 14,
          condition: '微风',
          humidity: '48%'
        }),
        temperature: 14.0,
        mood: '宁静',
        rating: 4.6,
        photos: JSON.stringify([]),
        notes: '在公园里享受宁静的午后时光',
        tags: JSON.stringify(['散步', '宁静', '秋日']),
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 12,
        user_id: 1,
        outfit_id: 4, // 运动休闲 (第三次穿着)
        wear_date: new Date('2024-01-03'),
        occasion: '居家办公',
        location: '家里',
        weather: JSON.stringify({
          temperature: 22,
          condition: '室内',
          humidity: '50%'
        }),
        temperature: 22.0,
        mood: '专注',
        rating: 4.0,
        photos: JSON.stringify([]),
        notes: '在家办公也要保持舒适的穿着',
        tags: JSON.stringify(['居家', '办公', '舒适']),
        created_at: new Date(),
        updated_at: new Date(),
      },
    ]);
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.bulkDelete('wear_records', null, {});
  },
};
